import React, { Suspense } from 'react';
import {useRoutes} from 'react-router-dom'
import routes from './routeConfig'
import '../style/loading.scss'

function RouterView( ) {
  return (
    <Suspense fallback={<div className='loading'><img src="https://img.zcool.cn/community/01415f5996acdaa8012156038f6b78.gif" alt="" /></div>}>
      {
        useRoutes(routes)
      }
    </Suspense>
  );
}

export default RouterView;